package com.mdlib.droid.base;

import android.content.BroadcastReceiver;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.content.LocalBroadcastManager;

import com.mdlib.droid.AppManager;


/**
 * Created by librabin on 17/2/8.
 */

public abstract class BaseAppActivity extends BaseActivity {


    private LocalBroadcastManager mLocalBroadcastManager;
    private BroadcastReceiver mExitBroadcastReceiver;


    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
//        PushAgent.getInstance(this).onAppStart();
        AppManager.getAppManager().addActivity(this);

//        mLocalBroadcastManager = LocalBroadcastManager.getInstance(this);
//        mExitBroadcastReceiver = new ExitBroadcastReceiver();
//        mLocalBroadcastManager.registerReceiver(mExitBroadcastReceiver,
//                new IntentFilter(MDConstant.EXIT_APP));

    }


    @Override
    protected void onResume() {
        super.onResume();
    }

    @Override
    protected void onPause() {
        super.onPause();
    }


    @Override
    protected void onDestroy() {
        super.onDestroy();
    }


//    public class ExitBroadcastReceiver extends BroadcastReceiver {
//        @Override
//        public void onReceive(Context context, Intent intent) {
//            if (intent.getAction().equals(MDConstant.EXIT_APP)) {
//                onReceiveExitMsg();
//            }
//        }
//    }


//    public void onReceiveExitMsg() {
//        MDAppUtils.showKickOutDialog(this);
//    }


}
